import './style.css'
import { Tabs } from 'antd-mobile'
import { useTabs } from './useTabs'
import HomeList from './HomeList'
const Home = () => {
    const channels = useTabs()
    return (
        <div className="tabContainer">
            {
                <Tabs defaultActiveKey='0'>
                    {
                        channels.map(item => {
                            return (
                                <Tabs.Tab title={item.name} key={item.id}>
                                    <div className='listContainer'>
                                        <HomeList channel_id={'' + item.id}></HomeList>
                                    </div>
                                </Tabs.Tab>
                            )
                        })
                    }
                </Tabs>

            }
        </div>
    )
}

export default Home
